package com.omt.tarjimdinek.domain.member.service;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.log4j.Logger;

import com.omt.tarjimdinek.domain.member.dao.PaysDao;
import com.omt.tarjimdinek.domain.member.entity.Pays;
import com.omt.tarjimdinek.support.GenericDao;
import com.omt.tarjimdinek.support.RepositoryImpl;

/**
 * Country manager implements
 * @author chabane
 *
 */
@Named("paysRepository")
@Singleton
public class PaysRepositoryImpl extends RepositoryImpl<Pays, Integer> implements PaysRepository {

	private PaysDao paysDao; 
	
	@SuppressWarnings("unused")
	private static final Logger log = Logger.getLogger(PaysRepositoryImpl.class);

	@Inject
	public void setPaysDao(PaysDao paysDao) {
	   this.paysDao = paysDao;
	}

	/**
	  * Dao getter used by the {@link RepositoryImpl}.
	  */
	@Override
	public GenericDao<Pays, Integer> getDao() {
	   return paysDao;
	}     
	    
    /**
     * {@inheritDoc}
     */
	public List<Pays> findAll() {
		return paysDao.findAll();
	}

	/**
     * {@inheritDoc}
     */
    @Override
    public Pays getNew() {
        return new Pays();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Pays getNewWithDefaults() {
    	Pays result = getNew();
        result.initDefaultValues();
        return result;
    }

}
